scripty2

class S2.UI.Menu

Superclass

Constructor

new S2.UI.Menu([element][, options])

Instance methods

  • addChoice #

    S2.UI.Menu#addChoice(choice) -> Element
    • choice (Element | String) – Content of the choice. If a string, will create a list item and set the string as its innerHTML. Can also be an Element; if a list item, will use as the choice. Otherwise, will surround the node with a list item and use that as the choice.

    Add a choice to the menu. Returns the added element.

  • addObservers #

    S2.UI.Menu#addObservers() -> undefined
  • clear #

    S2.UI.Menu#clear() -> this

    Empties the menu of choices.

  • close #

    S2.UI.Menu#close() -> this
  • highlightChoice #

    S2.UI.Menu#highlightChoice([element]) -> this
  • isOpen #

    S2.UI.Menu#isOpen() -> Boolean
  • open #

    S2.UI.Menu#open() -> this
  • removeObservers #

    S2.UI.Menu#removeObservers() -> undefined